using System.Collections.Generic;

namespace Intyme.Common.DataModel {
    public class Component {
        public int ID { get; set; }
        public string Name { get; set; }
        public Dictionary<int, Operation> Operations { get; private set; }
        public Dictionary<int, Component> ChildComponents { get; private set; }

        public Component() {
            ID = -1;
            Name = string.Empty;

            Operations = new Dictionary<int, Operation>();
            ChildComponents = new Dictionary<int, Component>();
        }

        public bool IsCorrect() {
            if (ID >= 0 && !string.IsNullOrEmpty(Name) &&
                Operations.Count > 0) {
                return true;
            }

            return false;
        }
    }
}